
/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
// RoomCreate.h
//

#pragma once

#include <BaseDefine.h>

class User;
class Room;
class RoomCreate{
public:
	virtual int create( const char* data, User* user, Room** room ) = 0;

	RoomCreate(){};
	virtual ~RoomCreate(){};

protected:
private:
};

class RoomCreate_Decorator : public RoomCreate{
public:
	int create( const char* data, User* user, Room** room ){
		if( preProcess_ )
			return preProcess_->create( data, user, room );

		return 0;
	}

	RoomCreate_Decorator( RoomCreate* preProcess ){
		preProcess_ = preProcess;
	}

	virtual ~RoomCreate_Decorator(){};

protected:

private:
	RoomCreate* preProcess_;
};
